import requests from '@/utils/request'

export const UserRegister = (data) => {
  return requests({
    url: '/v1/user/auth/register/',
    method: 'post',
    data
  })
}

// 登录获取token
export const UserLogin = (data) => {
  return requests({
    url: '/v1/user/auth/login/',
    method: 'post',
    data,
  })
}

// 刷新token
export const RefreshToken = () => {
  return requests({
    url: '/v1/user/auth/refreshToken/',
    method: 'get'
  })
}

// 获取信息且增加登录活跃度
export const GetUserInfo = () => {
  return  requests({
    url: '/v1/user/auth/info/',
    method: 'get'
  })
}
// 用户修改信息
export const ModifyUserInfo = (data) => {
  return  requests({
    url: '/v1/user/auth/info/',
    method: 'put',
    data,
  })
}

// 修改密码
export const ModifyPassword = (data) => {
  return  requests({
    url: '/v1/user/auth/password/',
    method: 'put',
    data,
  })
}

// 用户的连签信息
export const GetUserSigninInfo = () => {
  return  requests({
    url: '/v1/user/auth/signin/',
    method: 'get'
  })
}

// 签到
export const UserSignin = () => {
  return  requests({
    url: '/v1/user/auth/signin/',
    method: 'post'
  })
}

// 获取邀请码
export const UserInvitationCode = () => {
  return requests({
    url: '/v1/user/auth/invitationCode/',
    method: 'get'
  })
}

// // 获取菜单
// export const UserNavMenu = () => {
//   return  requests({
//     url: '/v1/user/menu/navigation/',
//     method: 'get'
//   })
// }
